﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model = FortuneArterial.Site.Model;

namespace FortuneArterial.Site.BusinessLogicLayer.Database
{
    public class Context
        : DbContext
    {
        public Context(string nameOrConnStr = null)
            : base(string.IsNullOrEmpty(nameOrConnStr)
                ? "name=FortuneArterialConnectionString"
                : nameOrConnStr)
        {

        }

        //System
        public DbSet<Model.System.CodeRecordInfo> CodeRecordInfoSet { get; set; }

        //Site & Page
        public DbSet<Model.Site.SiteInfo> SiteInfoSet { get; set; }
        public DbSet<Model.Site.PageGroupInfo> PageGroupInfoSet { get; set; }
        public DbSet<Model.Site.PageInfo> PageInfoSet { get; set; }

        //Assets
        public DbSet<Model.Assets.AssetsInfo> AssetsInfoSet { get; set; }

        //Blog
        public DbSet<Model.Blog.ArticleInfo> ArticleInfoSet { get; set; }
        public DbSet<Model.Blog.TagInfo> TagInfoSet { get; set; }

    }
}
